package com.tangcco.lockwell.repository;
import com.tangcco.lockwell.domain.Question;
import com.tangcco.lockwell.viewmodel.admin.question.QuestionPageRequestOtherVM;
import com.tangcco.lockwell.viewmodel.admin.question.QuestionPageRequestVM;
import com.tangcco.lockwell.viewmodel.admin.question.QuestionVMUpdate;
import com.tangcco.lockwell.viewmodel.admin.question.QuestionVm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/*
 *薛明宇
 */
@Mapper
public interface QuestionMapper extends BaseMapper<QuestionVm> {

    List<Question> page(QuestionPageRequestVM requestVM);

    List<Question> selectByIds(@Param("ids") List<Integer> ids);
    //联表查询
    List<QuestionVm> selectAll(QuestionPageRequestVM questionPageRequestVM);
    //通过Id查找对应数据
    QuestionVm selectById(Integer id);

    Question selectBaseInfoById(Integer id);

    int updateByIdS(QuestionVMUpdate questionVm);
    //查询所有的其他题目
    List<QuestionVm> selectAllOther(QuestionPageRequestOtherVM questionPageRequestOtherVM);
    //添加
   int insertQuestion(QuestionVMUpdate questionVMUpdate);
   //添加
    int inserts(Question question);
    //查询题目数量
    int selectCount();
}
